# -*- coding: utf-8 -*-
# @Time    : 2022/10/8 22:53
# @Author  : 修远
# @File    : book.py
# @Comment : 

from flask import Blueprint, jsonify
from app.model import Student, Result
from app.utils.enums import Gender, Status
from app.libs.redprint import Redprint

api = Redprint('book')


@api.route("/hello", methods=["GET"])
def test():
    student = Student.Student()
    student.name = "孙胜"
    student.age = 22
    student.sex = Gender.gender_str(Gender.MALE)
    student.score = 99.5
    result = Result.Result(Status.SUCCESS_CODE.value, Status.SUCCESS.value)
    result.result["data"] = []
    result.result["data"].append(student)
    return jsonify(result)
